﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;

namespace WmsApp.WmsService
{
    public partial class GoodsCodeType : IWcfState
    {
        public static GoodsCodeType CreateGoodsCodeType(String newGoodsCode)
        {
            var goodsCodeType = new GoodsCodeType
            {
                NewGoodsCode = newGoodsCode,
                ExtVarChar3 =  "1",
                SafeStoreQty = 0,
                WcfEntityState = System.Data.EntityState.Added
            };
            goodsCodeType.BindPropertyChanged();
            return goodsCodeType;
        }

        public void BindPropertyChanged()
        {
            this.PropertyChanged += WmsApp.EntityControl.PropertyChangedHandler.EntityObjectPropertyChanged;
        }

        public string Status
        {
            get
            {
                if (this.ExtVarChar3 == "0")
                    return "已作废";
                return "";
            }
        }
    }
}
